package com.fdc_project.controller;


import com.fdc_project.entity.Doingproject;
import com.fdc_project.service.impl.DoingprojectServiceImpl;
import com.fdc_project.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Sk
 * @since 2021-11-29
 */
@RestController
@RequestMapping("/doingproject")
public class DoingprojectController {

    @Autowired
    DoingprojectServiceImpl doingprojectService;

    @PostMapping("/add")
    public Result addDoing(@RequestBody List<Doingproject> doingprojects){return doingprojectService.add(doingprojects);}

    @PostMapping("/deleteAll")
    public Result delAllDoing(Integer pro_id){return doingprojectService.deleteAll(pro_id);}

    @PostMapping("/selectAll")
    public Result selectAll(Integer pro_id){return doingprojectService.selectcall(pro_id);}

    @PostMapping("/selectOne")
    public Result selectOne(Integer pro_id,Integer staff_id){return doingprojectService.selectone(pro_id,staff_id);}

    @PostMapping("/opinion")
    public Result opinion(Integer pro_id,Integer staff_id,String opinion){return doingprojectService.opinion(pro_id,staff_id,opinion);}


}

